home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / Tool Chest / Development Platforms / AppsToGo / AppsToGo.src / DTS.Draw / DTS.Draw.make < prev    next >
Encoding:
Text File  |  1993-06-18  |  7.0 KB  |  171 lines  |  [TEXT/MPS ]

  1. #------------------------------------------------------------------------------
  2. #
  3. #    Apple Macintosh Developer Technical Support
  4. #
  5. #    Program:    DTS.Draw
  6. #    File:        DTS.Draw.make    -    Make Source
  7. #
  8. #    Copyright © 1988-1992 Apple Computer, Inc.
  9. #    All rights reserved.
  10. #
  11. #------------------------------------------------------------------------------
  12.  
  13. AppName            =    'DTS.Draw'
  14. Signature        =    'DTSD'
  15.  
  16. DTS.Lib.folder    =    "::DTS.Lib:"
  17. DTS.Lib.hdrs    =    "::DTS.Lib:DTS.Lib.headers:"
  18. projsrc            =    :
  19. obj                =     :OBJECT:
  20.  
  21. #------------------------------------------------------------------------------
  22. # Options for our compilers:
  23. #    -sym on: tells the compilers and linker to emit symbol information for
  24. #        a source level debugger, such as SADE.
  25. #    -i {DTS.Lib.hdrs}: means to look for any #include files in the specified
  26. #        directory, as well as the normal set.
  27. #    -r: tells the C compiler to require function prototypes.
  28. #    -mbg off: tells the compilers to not emit low-level debugger names. This
  29. #        saves on file space, but you may wish to remove this option if you
  30. #        need to debug with something like Macsbug.
  31. #    -rd: for Rez means to suppress warnings for redeclared types (we redeclare
  32. #        'RECT' because it’s not included in MPW 3.0).
  33. #    -append: means to add the resources to the target file, rather than
  34. #        deleting all the ones that are there first.
  35. #    -d Signature...: is a way of passing our application's signature to Rez.
  36. #        With this mechanism, we can define our signature here, and export
  37. #        it to Rez, so that we don't have to declare it there, too.
  38. #    -sn STDCLIB=Main: puts all the routines that would normally go into the
  39. #        STDCLIB segment into the Main segment. This is done so that when we
  40. #        call upon any low-level utilities, we don't potentially move memory
  41. #        by loading in a segment.
  42. #------------------------------------------------------------------------------
  43.  
  44. SymOptions        =    #-sym on                    # turn this on to debug with SADE
  45. IncludesFolders    =    -i {DTS.Lib.hdrs}
  46.  
  47. COptions        =    {IncludesFolders} {SymOptions} -r -mbg on
  48. RezOptions        =    {IncludesFolders} -rd -append -d Signature="{Signature}" -d AppName={AppName}
  49. LinkOptions        =    {SymOptions} {SegmentMappings} -msg nodup -w
  50. SegmentMappings    =    -sn INTENV=Main ∂
  51.                     -sn STDCLIB=Main ∂
  52.                     -sn SANELIB=Main ∂
  53.                     -sn StringUtils=Main ∂
  54.                     -sn UtilMain=Main
  55.  
  56. #------------------------------------------------------------------------------
  57. # These are modified default build rules.  This is necessary to take into
  58. # account differences between MPW 3.1 and 3.2
  59. #------------------------------------------------------------------------------
  60. {obj}            ƒ    {projsrc}
  61.  
  62. {obj}.p.o        ƒ    {projsrc}.p
  63.     {Pascal} {POptions} {PAltOptions} {DepDir}{Default}.p -o {TargDir}{Default}.p.o
  64.  
  65. {obj}.c.o        ƒ    {projsrc}.c
  66.     {C} {COptions} {CAltOptions} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
  67.  
  68. #------------------------------------------------------------------------------
  69. # These are the objects that we want to link with. If any one of these
  70. # changes, then we invoke the Link command.
  71. #------------------------------------------------------------------------------
  72. AppObjects        =    ∂
  73.                     {obj}Clipboard.c.o ∂
  74.                     {obj}Colors.c.o ∂
  75.                     {obj}DoEvent.c.o ∂
  76.                     {obj}EventLoop.c.o ∂
  77.                     {obj}File.c.o ∂
  78.                     {obj}IdleTasks.c.o ∂
  79.                     {obj}Menu.c.o ∂
  80.                     {obj}PenSizeDialog.c.o ∂
  81.                     {obj}Start.c.o ∂
  82.                     {obj}TExtSelectObj.c.o ∂
  83.                     {obj}TGroupObj.c.o ∂
  84.                     {obj}TLineObj.c.o ∂
  85.                     {obj}ToolPalette.c.o ∂
  86.                     {obj}TOvalObj.c.o ∂
  87.                     {obj}TPieObj.c.o ∂
  88.                     {obj}TRectObj.c.o ∂
  89.                     {obj}TreeObj2.c.o ∂
  90.                     {obj}TRootObj.c.o ∂
  91.                     {obj}TRRectObj.c.o ∂
  92.                     {obj}Window.c.o ∂
  93.                     {obj}WindowDialog.c.o ∂
  94.                     {obj}WindowPalette.c.o
  95.  
  96. CSysObjects = ∂
  97.     {DTS.Lib.folder}DTS.Lib_controls ∂
  98.     {DTS.Lib.folder}DTS.Lib_ctlhandler ∂
  99.     {DTS.Lib.folder}DTS.Lib_framework ∂
  100.     {DTS.Lib.folder}DTS.Lib_strings ∂
  101.     {DTS.Lib.folder}DTS.Lib_treeobj ∂
  102.     {DTS.Lib.folder}DTS.Lib_utils ∂
  103.     "{Libraries}Runtime.o" ∂
  104.     "{CLibraries}StdCLib.o" ∂
  105.     "{Libraries}Interface.o"
  106.  
  107. #------------------------------------------------------------------------------
  108. # Dependencies for the individual components. These will invoke the
  109. # default build rules listed in Chapter 9 of the MPW 3.0 manual.
  110. # You may wish to reduce the number of dependencies.  Two dependencies
  111. # you may wish to remove are this makefile and the App.protos.h file.
  112. # For the App.protos.h file, if you add a function to the list of
  113. # functions in App.protos.h, you will cause all the source files to be
  114. # recompiled.  This may be more than you want to wait for each time you
  115. # add a function to your application.  On the other hand, if you do not
  116. # include this in the dependencies, and you change the parameters for a
  117. # function, and make the respective change to App.protos.h, any files
  118. # that reference that function will not be recompiled.  If these files are
  119. # recompiled, the prototype checking will catch any cases where you did
  120. # not change the way the altered function was called.  <<You choose>>
  121. #------------------------------------------------------------------------------
  122.  
  123. {AppObjects}    ƒ    #{AppName}.make
  124. #                    App.h ∂
  125. #                    App.protos.h ∂
  126. #                    App.defs.h ∂
  127. #                    {DTS.Lib.folder}DTS.Lib
  128.  
  129.  
  130. #------------------------------------------------------------------------------
  131. # This is a dummy dependency rule.  This will always be executed.  This dummy
  132. # rule must be the first for {AppName} so that it will be executed first.
  133. # This is necessary to make evaluations that are beyond the scope of
  134. # Make.  These evaluations will be performed by the application at execution time,
  135. # and they must execute first because compile and link command lines depend
  136. # on variables set up by these evaluations.  This has the unfortunate side
  137. # effect that Make will always consider {AppName} to be out of date.  It will
  138. # always, at a minimum, execute the commands for the target ShellForce.
  139. #------------------------------------------------------------------------------
  140.  
  141. {AppName}            ƒƒ ShellForce
  142.  
  143. # With the above rule, {AppName} will always be out of date with respect to
  144. # the non-existent file ShellForce.  This will force the following commands to
  145. # be executed.
  146. ShellForce            ƒ
  147.     BEGIN
  148.         IF "{ShellVersion}" == ""
  149.             ( EVALUATE "`Version`" =~ /MPW Shell≈ ([0-9]+(.[ab0-9]+)+)®1≈/ ) ∑ Dev:Null
  150.             SET ShellVersion "{®1}"
  151.         END
  152.     END ∑ Dev:Null # Output to bit bucket so we don’t see above calculations
  153.  
  154. #------------------------------------------------------------------------------
  155. # Build rule that links our application together. If any of our objects 
  156. # changes, or this makefile changes, then we relink.  The dummy prerequisite
  157. # ShellForce must come before any other prerequisites for {AppName}
  158. #------------------------------------------------------------------------------
  159.  
  160. {AppName}            ƒƒ {AppObjects}
  161.     Link {LinkOptions} -o {Targ} {AppObjects} {CSysObjects}
  162.     SetFile {Targ} -t APPL -c {Signature} -a B
  163.  
  164. #------------------------------------------------------------------------------
  165. # Build rule that creates our resources and adds them to the application
  166. #------------------------------------------------------------------------------
  167.  
  168. {AppName}        ƒƒ    {AppName}.make ∂
  169.                     {AppName}.r
  170.     Rez {RezOptions} {AppName}.r -o {Targ}
  171.